package com.cupk.dtos;

import lombok.Data;
import lombok.NoArgsConstructor; // 添加无参构造

@Data
@NoArgsConstructor // 添加无参构造以方便使用
public class JwtResponse {
    private String token;
    private String type = "Bearer";
    private Long id;
    private String username;
    private String email;
    private String role;

    // ---【核心新增字段】---
    private String fullName;
    private String phoneNumber;
    private String department;
    private String avatarUrl; // 顺便为后续的头像功能做准备

    // 保留原有的构造函数，并创建一个新的全参数构造函数
    public JwtResponse(String token, Long id, String username, String email, String role, String fullName, String phoneNumber, String department, String avatarUrl) {
        this.token = token;
        this.id = id;
        this.username = username;
        this.email = email;
        this.role = role;
        this.fullName = fullName;
        this.phoneNumber = phoneNumber;
        this.department = department;
        this.avatarUrl = avatarUrl;
    }

    // 为了兼容性，可以保留旧的构造函数，但建议未来移除
    public JwtResponse(String token, Long id, String username, String email, String role) {
        this.token = token;
        this.id = id;
        this.username = username;
        this.email = email;
        this.role = role;
    }
}